﻿using Autoupdate.Common;
using System;
using System.Windows.Forms;

namespace Autoupdate
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            string logSecion = "程序更新";
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                AutoupdateClient autoupdateClient = new AutoupdateClient();
                autoupdateClient.Run();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace,
                    "错误",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Error);
                Log.WriteError(logSecion, ex.Message + ex.StackTrace);
            }
        }
    }
}
